projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
42df9ed
)
swipe: Don't emit ::swipe if there are still active touches
author
Carlos Garnacho
<carlosg@gnome.org>
Thu, 17 Apr 2014 11:05:11 +0000
(13:05 +0200)
committer
Carlos Garnacho
<carlosg@gnome.org>
Fri, 23 May 2014 17:54:28 +0000
(19:54 +0200)
Avoids sending spurious signals when an extra touch happens.
gtk/gtkgestureswipe.c
patch
|
blob
|
history
diff --git
a/gtk/gtkgestureswipe.c
b/gtk/gtkgestureswipe.c
index c322566b59e56f5e7b8223de5fc4022673cc107e..25a714e69bcbf63ae78be291079ab1edca81695f 100644
(file)
--- a/
gtk/gtkgestureswipe.c
+++ b/
gtk/gtkgestureswipe.c
@@
-172,6
+172,9
@@
gtk_gesture_swipe_end (GtkGesture *gesture,
if (gtk_gesture_get_sequence_state (gesture, seq) == GTK_EVENT_SEQUENCE_DENIED)
return;
+ if (gtk_gesture_is_active (gesture))
+ return;
+
priv = gtk_gesture_swipe_get_instance_private (swipe);
_gtk_gesture_swipe_calculate_velocity (swipe, &velocity_x, &velocity_y);
g_signal_emit (gesture, signals[SWIPE], 0, velocity_x, velocity_y);